package com.oig.sys.file.entity;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EntityListeners;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Version;
import java.io.Serializable;


/**
 * @author wuxl
 */
@Getter
@Setter
@ToString
@Entity
@Table(name = "tb_template_file")
@EntityListeners({AuditingEntityListener.class})
public class TbTemplateFile implements Serializable {

	/**
	 */
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	@Column(name = "id", nullable = false)
	private Integer id;

//	/**
//	 */
//	@Column(name = "system_id")
//	private Integer systemId;
//
//	/**
//	 * 应用名称
//	 */
//	@Column(name = "system_name")
//	private String systemName;

	/**
	 * 主业务类型，代理、仓储、运输
	 */
	@Column(name = "business_type")
	private String businessType;

	/**
	 * 单据类型 主业务下很多具体单据
	 */
	@Column(name = "relation_type")
	private String relationType;

	/**
	 */
	@Column(name = "template_name", length = 128)
	private String templateName;

	/**
	 */
	@Column(name = "file_type")
	private String fileType;

	/**
	 */
	@Column(name = "file_id", length = 32)
	private String fileId;

	/**
	 */
	@Column(name = "file_name", length = 128)
	private String fileName;

	/**
	 */
	@Column(name = "file_url", length = 128)
	private String fileUrl;

	/**
	 */
	@Column(name = "remark")
	private String remark;

	/**
	 */
	@Column(name = "file_upload_id")
	private Integer fileUploadId;

	/**
	 */
	@Column(name = "file_upload_name", length = 32)
	private String fileUploadName;

	/**
	 */
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "file_upload_time")
	private java.util.Date fileUploadTime;

	/**
	 */
	@Version
	@Column(name = "version")
	private Integer version;

	/**
	 */
	@Column(name = "tenant_id")
	private Integer tenantId;

	/**
	 */
	@Column(name = "tenant_name", length = 128)
	private String tenantName;

	/**
	 */
	@Column(name = "status")
	private String status;

	/**
	 */
	@Column(name = "check_id")
	private Integer checkId;

	/**
	 */
	@Column(name = "check_name", length = 32)
	private String checkName;

	/**
	 * 复核备注
	 */
	@Column(name = "check_remark")
	private String checkRemark;

	/**
	 */
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "check_time")
	private java.util.Date checkTime;
}
